package com.kcyu.egoodsmapbackend.entity;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.kcyu.egoodsmapbackend.enums.PresaleEnums;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
/**
 * <p>
 * 
 * </p>
 *
 * @author kcyu
 * @since 2025-03-03
 */
@Getter
@Setter
@ToString
public class Goods implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 主键ID
     */
    private Integer id;

    private String name;

    /**
     * 分类ID
     */
    private Integer categoryId;

    /**
     * 购入价格
     */
    private BigDecimal purchasePrice;

    /**
     * 邮费
     */
    private BigDecimal postage;

    /**
     * 是否预售
     */
    private PresaleEnums isPresale;

    /**
     * 售出时间
     */
    private LocalDateTime soldTime;

    /**
     * 购入时间
     */
    private LocalDateTime purchaseTime;

    /**
     * 售出价格
     */
    private BigDecimal soldPrice;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(fill = FieldFill.UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private LocalDateTime updateTime;
}
